//
//  BLCertificate_Cell.m
//  Byelone
//
//  Created by 乔小乔 on 2021/2/3.
//

#import "BLCertificate_Cell.h"
#import "BLCertificateModel.h"
@implementation BLCertificate_Cell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)reloadWithData:(BLCertificateItem *)model{
    self.labelName.text = model.authTypeName;
    self.labelStatus.text =  [self getStatusText:model.authStatus];
    if ([model.authType isEqualToString:@"1"]) {
        self.imageAuthType.image = [UIImage imageNamed:@"my_identity"];
    }else{
        self.imageAuthType.image = [UIImage imageNamed:@"my_education"];
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (NSString *)getStatusText:(NSString *)status{
//    0待认证1认证中 2认证通过 3认证失败
    if ([status isEqualToString:@"0"]) {
        return @"待认证";
    }else if ([status isEqualToString:@"1"]) {
        return @"认证中";
    }else if ([status isEqualToString:@"2"]) {
        return @"认证通过";
    }else if ([status isEqualToString:@"3"]) {
        return @"认证失败";
    }
    return @"";
}
@end
